{template 'common/header-base'}
<div class="skin-classical" data-skin="classical">
<div class="related-info-drop-right animated fadeInLeft hidden">
	<ul>
		<li>
			<a href="javascript:;">
				<span class=""><i class="wi wi-wechat"></i>公众号公众号</span>
				<span class="plus"><i class="wi wi-plus"></i></span>
				<span class=""><i class="wi wi-wechat"></i>公众号公众号</span>
				<span class="plus"><i class="wi wi-plus"></i></span>
				<span class=""><i class="wi wi-wxapp"></i>小程序小程序</span>
			</a>
		</li>
		<li>
			<a href="javascript:;">
				<span class=""><i class="wi wi-wechat"></i>这是app</span>
				<span class="plus"><i class="wi wi-plus"></i></span>
				<span class=""><i class="wi wi-wechat"></i>公众号公众号</span>
			</a>
		</li>
		<li>
			<a href="javascript:;">
				<span class=""><i class="wi wi-wxapp"></i>小程序小程序</span>
			</a>
		</li>
	</ul>
	<script>
		$(function(){
			var top = $('.left-menu .related-info').offset().top;
			var left = $('.left-menu .related-info').offset().left;
			var width = $('.left-menu .related-info').outerWidth(true);
			$('.related-info-drop-right').css({left: (left + width) + 'px', top: top + 'px'});
			$('.left-menu .drop-menu-right').click(function(){
				$('.related-info-drop-right').toggle();
			});
		});
	</script>
</div>
{php $frames = buildframes(FRAME);_calc_current_frames($frames);}
<div class="first-sidebar">
		<div class="{if !empty($frames['section']['platform_module_menu']['plugin_menu'])}plugin-head{/if}">
			<a class="logo-wrap" href="{$_W['siteroot']}">
				<img src="{if !empty($_W['setting']['copyright']['blogo'])}{php echo tomedia($_W['setting']['copyright']['blogo'])}{else}./resource/images/logo/logo.png{/if}" class="logo">
			</a>
			{if !empty($_W['uid'])}
			<div class="nav">
				<ul class="main-nav">
					{php global $top_nav}
					{loop $top_nav $nav}
					<li{if FRAME == $nav['name']} class="active"{/if}>
						<a href="{if empty($nav['url'])}{php echo url('home/welcome/' . $nav['name']);}{else}{$nav['url']}{/if}" {if !empty($nav['blank'])}target="_blank"{/if}>
					<i class="{$nav['icon']}"></i>
					{$nav['title']}</a>
					</li>
					{/loop}
				</ul>
				<ul class="user-info">
					<li class="dropdown">
						<a href="javascript:;" class="dropdown-toggle" data-toggle="dropdown"><i class="wi wi-user"></i>{$_W['user']['username']}</a>
						<ul class="dropdown-menu color-gray" role="menu">
							<li>
								<a href="{url 'user/profile'}" target="_blank"><i class="wi wi-account color-gray"></i> 我的账号</a>
							</li>
							{if $_W['isfounder']}
							<li class="divider"></li>
							<li><a href="{url 'cloud/upgrade'}" target="_blank"><i class="wi wi-update color-gray"></i> 自动更新</a></li>
							<li><a href="{url 'system/updatecache'}" target="_blank"><i class="wi wi-cache color-gray"></i> 更新缓存</a></li>
							<li class="divider"></li>
							{/if}
							<li>
								<a href="{url 'user/logout'}"><i class="fa fa-sign-out color-gray"></i> 退出系统</a>
							</li>
						</ul>
					</li>
				</ul>
			</div>
			{else}
			<ul class="user-info">
				<li class="dropdown"><a href="{php echo url('user/register');}">注册</a></li>
				<li class="dropdown"><a href="{php echo url('user/login');}">登录</a></li>
			</ul>
			{/if}
		</div>
</div>
<!--帮助和服务-->
<div class="right-sidebar">
	<div class="help-service">
		<div class="right-sidebar-top">
			<span class="wi wi-explain-sign"></span>帮助和服务
		</div>
		<div class="right-sidebar-content">
			<div class="content">
				<div><a href="javascript:;">如何接入公众号?</a></div>
			</div>
		</div>
	</div>
</div>
<!--end 帮助和服务-->
<!--提示信息-->
<div class="system-hint fadeInUp animated">
	<div class="hint-heading">
		<a href="javascript:;" class="pull-right"><span class="wi wi-error"></span></a>
		提示中心
	</div>
	<div class="hint-body">
		<!--系统提示-->
		{if $_COOKIE['private_app_notice']}
		<div class="hint-item">
			<div class="hint-from">
				<a href="javascript:;" class="pull-right"><span class="wi wi-error"></span></a>
				来自 <span>系统消息</span>
			</div>
			<a href="javascript:;">
				{$_COOKIE['private_app_notice']}
			</a>
			<span class="tips-close" onclick="check_setmeal_hide();" ><i class="wi wi-error-sign"></i></span>
			{php setcookie('private_app_notice', '', -1);}
		</div>
		{/if}
		<!--end  系统提示-->
		{if empty($_COOKIE['check_setmeal']) && !empty($_W['account']['endtime']) && ($_W['account']['endtime'] - TIMESTAMP < (6*86400))}
		<div class="hint-item">
			<div class="hint-from">
				<a href="javascript:;" class="pull-right"><span class="wi wi-error"></span></a>
				来自 <span>系统消息</span>
			</div>
			<a href="{if $_W['isfounder']}{php echo url('user/edit', array('uid' => $_W['account']['uid']));}{else}javascript:void(0);{/if}">
				您的服务有效期限：{php echo date('Y-m-d', $_W['account']['starttime']);} ~ {php echo date('Y-m-d', $_W['account']['endtime']);}.
				{if $_W['account']['endtime'] < TIMESTAMP}
				目前已到期，请联系管理员续费
				{else}
				将在{php echo floor(($_W['account']['endtime'] - strtotime(date('Y-m-d')))/86400);}天后到期，请及时付费
				{/if}
			</a>
			<span class="tips-close" onclick="check_setmeal_hide();"><i class="wi wi-error-sign"></i></span>
			<script>
				function check_setmeal_hide() {
					util.cookie.set('check_setmeal', 1, 1800);
					$('#setmeal-tips').hide();
					return false;
				}
			</script>
		</div>
		{/if}
	</div>
</div>
<!--end 提示信息-->
<div class="main main-classical">
{if !defined('IN_MESSAGE')}
<div class="container">
	{if in_array(FRAME, array('account', 'system', 'advertisement', 'wxapp', 'site')) && !in_array($_GPC['a'], array('news-show', 'notice-show'))}
	<div class="panel panel-content main-panel-content {if !empty($frames['section']['platform_module_menu']['plugin_menu'])}panel-content-plugin{/if}">
	<div class="panel-body clearfix main-panel-body">
		<div class="left-menu">
				<div class="left-menu-top">
					{if !empty($_GPC['m']) && !in_array($_GPC['m'], array('keyword', 'special', 'welcome', 'default', 'userapi', 'service')) || defined('IN_MODULE')}
						<div class="apply-fixed-top">
							{template 'common/header-module'}
						</div>
					{else}
						<div class="left-menu-top-panel">
							{template 'common/header-' . FRAME}
						</div>
					{/if}
				</div>
			{if empty($frames['section']['platform_module_menu']['plugin_menu'])}
				{loop $frames['section'] $frame_section_id $frame_section}
				{if !isset($frame_section['is_display']) || !empty($frame_section['is_display'])}
				<div class="panel panel-menu">
					<ul class="list-group">
						{loop $frame_section['menu'] $menu_id $menu}
						{if !empty($menu['is_display'])}
							{if $menu_id == 'platform_module_more'}
							<li class="list-group-item">
								<a href="{url 'module/manage-account'}" target="_blank">
									<div class="icon-more"><span class="wi wi-plus"></span></div>
									<div>更多应用</div>
								</a>
							</li>
							{else}
							<li class="list-group-item {if $menu['active']}active{/if}">
								<a href="{$menu['url']}" {if $frame_section_id == 'platform_module'}target="_blank"{/if}>
								{if $menu['icon']}
									{if $frame_section_id == 'platform_module'}
									<img src="{$menu['icon']}"/>
									{else}
									<i class="{$menu['icon']}"></i>
									{/if}
								{/if}
								<div class="text-over">{$menu['title']}</div>
								</a>
							</li>
							{/if}
						{/if}
						{/loop}
					</ul>
				</div>
				{/if}
				{/loop}
			{else}
				<div class="plugin-menu clearfix">
					<div class="plugin-menu-main pull-left">
						<ul class="list-group">
							<li class="list-group-item{if $_W['current_module']['name'] == $frames['section']['platform_module_menu']['plugin_menu']['main_module']} active{/if}">
								<a href="{php echo url('home/welcome/ext', array('m' => $frames['section']['platform_module_menu']['plugin_menu']['main_module']))}">
									<i class="wi wi-main-apply"></i>
									<div>主应用</div>
								</a>
							</li>
							<li class="list-group-item">
								<div>插件</div>
							</li>
							{loop $frames['section']['platform_module_menu']['plugin_menu']['menu'] $plugin_name $plugin}
							<li class="list-group-item{if $_W['current_module']['name'] == $plugin_name} active{/if}">
								<a href="{php echo url('home/welcome/ext', array('m' => $plugin_name))}">
									<img src="{$plugin['icon']}" alt="" class="img-icon" />
									<div>{$plugin['title']}</div>
								</a>
							</li>
							{/loop}
						</ul>
						{php unset($plugin_name);}
						{php unset($plugin);}
					</div>
					<div class="plugin-menu-sub pull-left">
						{loop $frames['section'] $frame_section_id $frame_section}
						{if !isset($frame_section['is_display']) || !empty($frame_section['is_display'])}
							<div class="panel panel-menu">
								<ul class="list-group>
									{loop $frame_section['menu'] $menu_id $menu}
									{if !empty($menu['is_display'])}
									{if $menu_id == 'platform_module_more'}
									<li class="list-group-item">
										<a href="{url 'module/manage-account'}" target="_blank">
											<div><span class="wi wi-plus"></span></div>
											更多应用</a>
									</li>
									{else}
									<li class="list-group-item {if $menu['active']}active{/if}">
										<a href="{$menu['url']}" class="text-over" {if $frame_section_id == 'platform_module'}target="_blank"{/if}>
										{$menu['title']}
										</a>
									</li>
									{/if}
									{/if}
									{/loop}
								</ul>
							</div>
						{/if}
						{/loop}
					</div>
				</div>
			{/if}
		</div>
		<div class="right-content">
			<div class="content">
	{/if}
{/if}